package rsparql.test;

import rsparql.SparqlQuery;


public abstract class SparqlPrinter {

	public static void print(SparqlQuery sparqlQuery) {
		System.out.print("  ");
		for (String name : sparqlQuery.colNames()) {
			System.out.print(name + " | ");
		}
		System.out.println();

		for (int r = 0; r < sparqlQuery.rows(); r++) {
			System.out.print(r + ": ");
			for (int c = 0; c < sparqlQuery.cols(); c++) {
				Object value = sparqlQuery.cell(r, c);
				System.out.print(value + " | ");
			}
			System.out.println();
		}
	}
	
}
